\(\int \frac {(A+B \sin (e+f x)) (c+d \sin (e+f x))^3}{(a+a \sin (e+f x))^3} \, dx\) [279]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 35, antiderivative size = 225 \[ \int \frac {(A+B \sin (e+f x)) (c+d \sin (e+f x))^3}{(a+a \sin (e+f x))^3} \, dx=\frac {d^2 (3 B (c-d)+A d) x}{a^3}+\frac {d^2 (3 B (c-9 d)+A (2 c+7 d)) \cos (e+f x)}{15 a^3 f}-\frac {(c-d) \left (3 B \left (c^2+6 c d-15 d^2\right )+A \left (2 c^2+7 c d+15 d^2\right )\right ) \cos (e+f x)}{15 f \left (a^3+a^3 \sin (e+f x)\right )}-\frac {(3 B (c-3 d)+2 A (c+2 d)) \cos (e+f x) (c+d \sin (e+f x))^2}{15 a f (a+a \sin (e+f x))^2}-\frac {(A-B) \cos (e+f x) (c+d \sin (e+f x))^3}{5 f (a+a \sin (e+f x))^3} \]

[Out]

d^2*(3*B*(c-d)+A*d)*x/a^3+1/15*d^2*(3*B*(c-9*d)+A*(2*c+7*d))*cos(f*x+e)/a^3/f-1/15*(c-d)*(3*B*(c^2+6*c*d-15*d^
2)+A*(2*c^2+7*c*d+15*d^2))*cos(f*x+e)/f/(a^3+a^3*sin(f*x+e))-1/15*(3*B*(c-3*d)+2*A*(c+2*d))*cos(f*x+e)*(c+d*si
n(f*x+e))^2/a/f/(a+a*sin(f*x+e))^2-1/5*(A-B)*cos(f*x+e)*(c+d*sin(f*x+e))^3/f/(a+a*sin(f*x+e))^3

Rubi [A] (verified)

Time = 0.57 (sec) , antiderivative size = 225, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3056, 3047, 3102, 2814, 2727} \[ \int \frac {(A+B \sin (e+f x)) (c+d \sin (e+f x))^3}{(a+a \sin (e+f x))^3} \, dx=-\frac {(c-d) \left (A \left (2 c^2+7 c d+15 d^2\right )+3 B \left (c^2+6 c d-15 d^2\right )\right ) \cos (e+f x)}{15 f \left (a^3 \sin (e+f x)+a^3\right )}+\frac {d^2 (A (2 c+7 d)+3 B (c-9 d)) \cos (e+f x)}{15 a^3 f}+\frac {d^2 x (A d+3 B (c-d))}{a^3}-\frac {(A-B) \cos (e+f x) (c+d \sin (e+f x))^3}{5 f (a \sin (e+f x)+a)^3}-\frac {(2 A (c+2 d)+3 B (c-3 d)) \cos (e+f x) (c+d \sin (e+f x))^2}{15 a f (a \sin (e+f x)+a)^2} \]

[In]

Int[((A + B*Sin[e + f*x])*(c + d*Sin[e + f*x])^3)/(a + a*Sin[e + f*x])^3,x]

[Out]

(d^2*(3*B*(c - d) + A*d)*x)/a^3 + (d^2*(3*B*(c - 9*d) + A*(2*c + 7*d))*Cos[e + f*x])/(15*a^3*f) - ((c - d)*(3*
B*(c^2 + 6*c*d - 15*d^2) + A*(2*c^2 + 7*c*d + 15*d^2))*Cos[e + f*x])/(15*f*(a^3 + a^3*Sin[e + f*x])) - ((3*B*(
c - 3*d) + 2*A*(c + 2*d))*Cos[e + f*x]*(c + d*Sin[e + f*x])^2)/(15*a*f*(a + a*Sin[e + f*x])^2) - ((A - B)*Cos[
e + f*x]*(c + d*Sin[e + f*x])^3)/(5*f*(a + a*Sin[e + f*x])^3)

Rule 2727

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> Simp[-Cos[c + d*x]/(d*(b + a*Sin[c + d*x])), x]
/; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rule 2814

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[b*(x/d)
, x] - Dist[(b*c - a*d)/d, Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d
, 0]

Rule 3047

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(
e_.) + (f_.)*(x_)]), x_Symbol] :> Int[(a + b*Sin[e + f*x])^m*(A*c + (B*c + A*d)*Sin[e + f*x] + B*d*Sin[e + f*x
]^2), x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0]

Rule 3056

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(A*b - a*B)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x]
)^n/(a*f*(2*m + 1))), x] - Dist[1/(a*b*(2*m + 1)), Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^(n -
1)*Simp[A*(a*d*n - b*c*(m + 1)) - B*(a*c*m + b*d*n) - d*(a*B*(m - n) + A*b*(m + n + 1))*Sin[e + f*x], x], x],
x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && LtQ
[m, -2^(-1)] && GtQ[n, 0] && IntegerQ[2*m] && (IntegerQ[2*n] || EqQ[c, 0])

Rule 3102

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (
f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Cos[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Dist[1/(
b*(m + 2)), Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x],
x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] &&  !LtQ[m, -1]

Rubi steps \begin{align*} \text {integral}& = -\frac {(A-B) \cos (e+f x) (c+d \sin (e+f x))^3}{5 f (a+a \sin (e+f x))^3}+\frac {\int \frac {(c+d \sin (e+f x))^2 (a (2 A c+3 B c+3 A d-3 B d)-a (A-6 B) d \sin (e+f x))}{(a+a \sin (e+f x))^2} \, dx}{5 a^2} \\ & = -\frac {(3 B (c-3 d)+2 A (c+2 d)) \cos (e+f x) (c+d \sin (e+f x))^2}{15 a f (a+a \sin (e+f x))^2}-\frac {(A-B) \cos (e+f x) (c+d \sin (e+f x))^3}{5 f (a+a \sin (e+f x))^3}+\frac {\int \frac {(c+d \sin (e+f x)) \left (a^2 \left (3 B \left (c^2+5 c d-6 d^2\right )+A \left (2 c^2+5 c d+8 d^2\right )\right )-a^2 d (3 B (c-9 d)+A (2 c+7 d)) \sin (e+f x)\right )}{a+a \sin (e+f x)} \, dx}{15 a^4} \\ & = -\frac {(3 B (c-3 d)+2 A (c+2 d)) \cos (e+f x) (c+d \sin (e+f x))^2}{15 a f (a+a \sin (e+f x))^2}-\frac {(A-B) \cos (e+f x) (c+d \sin (e+f x))^3}{5 f (a+a \sin (e+f x))^3}+\frac {\int \frac {a^2 c \left (3 B \left (c^2+5 c d-6 d^2\right )+A \left (2 c^2+5 c d+8 d^2\right )\right )+\left (-a^2 c d (3 B (c-9 d)+A (2 c+7 d))+a^2 d \left (3 B \left (c^2+5 c d-6 d^2\right )+A \left (2 c^2+5 c d+8 d^2\right )\right )\right ) \sin (e+f x)-a^2 d^2 (3 B (c-9 d)+A (2 c+7 d)) \sin ^2(e+f x)}{a+a \sin (e+f x)} \, dx}{15 a^4} \\ & = \frac {d^2 (3 B (c-9 d)+A (2 c+7 d)) \cos (e+f x)}{15 a^3 f}-\frac {(3 B (c-3 d)+2 A (c+2 d)) \cos (e+f x) (c+d \sin (e+f x))^2}{15 a f (a+a \sin (e+f x))^2}-\frac {(A-B) \cos (e+f x) (c+d \sin (e+f x))^3}{5 f (a+a \sin (e+f x))^3}+\frac {\int \frac {a^3 c \left (3 B \left (c^2+5 c d-6 d^2\right )+A \left (2 c^2+5 c d+8 d^2\right )\right )+15 a^3 d^2 (3 B (c-d)+A d) \sin (e+f x)}{a+a \sin (e+f x)} \, dx}{15 a^5} \\ & = \frac {d^2 (3 B (c-d)+A d) x}{a^3}+\frac {d^2 (3 B (c-9 d)+A (2 c+7 d)) \cos (e+f x)}{15 a^3 f}-\frac {(3 B (c-3 d)+2 A (c+2 d)) \cos (e+f x) (c+d \sin (e+f x))^2}{15 a f (a+a \sin (e+f x))^2}-\frac {(A-B) \cos (e+f x) (c+d \sin (e+f x))^3}{5 f (a+a \sin (e+f x))^3}+\frac {\left ((c-d) \left (3 B \left (c^2+6 c d-15 d^2\right )+A \left (2 c^2+7 c d+15 d^2\right )\right )\right ) \int \frac {1}{a+a \sin (e+f x)} \, dx}{15 a^2} \\ & = \frac {d^2 (3 B (c-d)+A d) x}{a^3}+\frac {d^2 (3 B (c-9 d)+A (2 c+7 d)) \cos (e+f x)}{15 a^3 f}-\frac {(c-d) \left (3 B \left (c^2+6 c d-15 d^2\right )+A \left (2 c^2+7 c d+15 d^2\right )\right ) \cos (e+f x)}{15 f \left (a^3+a^3 \sin (e+f x)\right )}-\frac {(3 B (c-3 d)+2 A (c+2 d)) \cos (e+f x) (c+d \sin (e+f x))^2}{15 a f (a+a \sin (e+f x))^2}-\frac {(A-B) \cos (e+f x) (c+d \sin (e+f x))^3}{5 f (a+a \sin (e+f x))^3} \\ \end{align*}

Mathematica [A] (verified)

Time = 6.90 (sec) , antiderivative size = 366, normalized size of antiderivative = 1.63 \[ \int \frac {(A+B \sin (e+f x)) (c+d \sin (e+f x))^3}{(a+a \sin (e+f x))^3} \, dx=\frac {\left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \left (6 (A-B) (c-d)^3 \sin \left (\frac {1}{2} (e+f x)\right )-3 (A-B) (c-d)^3 \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )+2 (c-d)^2 (3 B (c-6 d)+A (2 c+13 d)) \sin \left (\frac {1}{2} (e+f x)\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^2-(c-d)^2 (3 B (c-6 d)+A (2 c+13 d)) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^3+2 (c-d) \left (3 B \left (c^2+8 c d-24 d^2\right )+A \left (2 c^2+11 c d+32 d^2\right )\right ) \sin \left (\frac {1}{2} (e+f x)\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^4-15 d^2 (-3 B c-A d+3 B d) (e+f x) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^5-15 B d^3 \cos (e+f x) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^5\right )}{15 a^3 f (1+\sin (e+f x))^3} \]

[In]

Integrate[((A + B*Sin[e + f*x])*(c + d*Sin[e + f*x])^3)/(a + a*Sin[e + f*x])^3,x]

[Out]

((Cos[(e + f*x)/2] + Sin[(e + f*x)/2])*(6*(A - B)*(c - d)^3*Sin[(e + f*x)/2] - 3*(A - B)*(c - d)^3*(Cos[(e + f
*x)/2] + Sin[(e + f*x)/2]) + 2*(c - d)^2*(3*B*(c - 6*d) + A*(2*c + 13*d))*Sin[(e + f*x)/2]*(Cos[(e + f*x)/2] +
 Sin[(e + f*x)/2])^2 - (c - d)^2*(3*B*(c - 6*d) + A*(2*c + 13*d))*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^3 + 2*
(c - d)*(3*B*(c^2 + 8*c*d - 24*d^2) + A*(2*c^2 + 11*c*d + 32*d^2))*Sin[(e + f*x)/2]*(Cos[(e + f*x)/2] + Sin[(e
 + f*x)/2])^4 - 15*d^2*(-3*B*c - A*d + 3*B*d)*(e + f*x)*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^5 - 15*B*d^3*Cos
[e + f*x]*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^5))/(15*a^3*f*(1 + Sin[e + f*x])^3)

Maple [A] (verified)

Time = 1.07 (sec) , antiderivative size = 349, normalized size of antiderivative = 1.55

method result size
derivativedivides \(\frac {-\frac {2 \left (A \,c^{3}-A \,d^{3}-3 d^{2} c B +3 d^{3} B \right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}-\frac {-4 A \,c^{3}+6 c^{2} d A -2 A \,d^{3}+2 B \,c^{3}-6 d^{2} c B +4 d^{3} B}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}-\frac {2 \left (8 A \,c^{3}-18 c^{2} d A +12 d^{2} c A -2 A \,d^{3}-6 B \,c^{3}+12 c^{2} d B -6 d^{2} c B \right )}{3 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}-\frac {-8 A \,c^{3}+24 c^{2} d A -24 d^{2} c A +8 A \,d^{3}+8 B \,c^{3}-24 c^{2} d B +24 d^{2} c B -8 d^{3} B}{2 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{4}}-\frac {2 \left (4 A \,c^{3}-12 c^{2} d A +12 d^{2} c A -4 A \,d^{3}-4 B \,c^{3}+12 c^{2} d B -12 d^{2} c B +4 d^{3} B \right )}{5 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{5}}+2 d^{2} \left (-\frac {d B}{1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )}+\left (d A +3 B c -3 d B \right ) \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )\right )}{a^{3} f}\) \(349\)
default \(\frac {-\frac {2 \left (A \,c^{3}-A \,d^{3}-3 d^{2} c B +3 d^{3} B \right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}-\frac {-4 A \,c^{3}+6 c^{2} d A -2 A \,d^{3}+2 B \,c^{3}-6 d^{2} c B +4 d^{3} B}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}-\frac {2 \left (8 A \,c^{3}-18 c^{2} d A +12 d^{2} c A -2 A \,d^{3}-6 B \,c^{3}+12 c^{2} d B -6 d^{2} c B \right )}{3 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}-\frac {-8 A \,c^{3}+24 c^{2} d A -24 d^{2} c A +8 A \,d^{3}+8 B \,c^{3}-24 c^{2} d B +24 d^{2} c B -8 d^{3} B}{2 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{4}}-\frac {2 \left (4 A \,c^{3}-12 c^{2} d A +12 d^{2} c A -4 A \,d^{3}-4 B \,c^{3}+12 c^{2} d B -12 d^{2} c B +4 d^{3} B \right )}{5 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{5}}+2 d^{2} \left (-\frac {d B}{1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )}+\left (d A +3 B c -3 d B \right ) \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )\right )}{a^{3} f}\) \(349\)
parallelrisch \(\frac {\left (\left (-300 f x A +900 f x B -540 A +1755 B \right ) d^{3}+180 c \left (-5 f x B +A -9 B \right ) d^{2}+180 c^{2} d \left (A +B \right )+180 c^{3} \left (A +\frac {B}{3}\right )\right ) \cos \left (\frac {f x}{2}+\frac {e}{2}\right )+\left (\left (30 f x A -90 f x B +108 A -363 B \right ) d^{3}-54 c \left (-\frac {5}{3} f x B +A -6 B \right ) d^{2}-36 \left (\frac {3 B}{2}+A \right ) c^{2} d -18 c^{3} \left (A +\frac {2 B}{3}\right )\right ) \cos \left (\frac {5 f x}{2}+\frac {5 e}{2}\right )+\left (\left (-300 f x A +900 f x B -340 A +1125 B \right ) d^{3}+60 c \left (-15 f x B +A -17 B \right ) d^{2}+180 c^{2} \left (A +\frac {B}{3}\right ) d +100 \left (A +\frac {3 B}{5}\right ) c^{3}\right ) \sin \left (\frac {f x}{2}+\frac {e}{2}\right )+\left (\left (-150 f x A +450 f x B -360 A +1215 B \right ) d^{3}+90 c \left (-5 f x B +A -12 B \right ) d^{2}+180 c^{2} \left (A +\frac {B}{2}\right ) d +90 c^{3} \left (A +\frac {2 B}{3}\right )\right ) \sin \left (\frac {3 f x}{2}+\frac {3 e}{2}\right )+\left (\left (150 f x A -450 f x B +80 A -225 B \right ) d^{3}-30 c \left (-15 f x B +A -8 B \right ) d^{2}-30 c^{2} d B -50 A \,c^{3}\right ) \cos \left (\frac {3 f x}{2}+\frac {3 e}{2}\right )+\left (\left (30 f x A -90 f x B -20 A +75 B \right ) d^{3}+30 c \left (3 f x B +A -2 B \right ) d^{2}+30 c^{2} d B -10 A \,c^{3}\right ) \sin \left (\frac {5 f x}{2}+\frac {5 e}{2}\right )-15 B \,d^{3} \left (\cos \left (\frac {7 f x}{2}+\frac {7 e}{2}\right )+\sin \left (\frac {7 f x}{2}+\frac {7 e}{2}\right )\right )}{30 f \,a^{3} \left (-10 \cos \left (\frac {f x}{2}+\frac {e}{2}\right )+5 \cos \left (\frac {3 f x}{2}+\frac {3 e}{2}\right )-5 \sin \left (\frac {3 f x}{2}+\frac {3 e}{2}\right )-10 \sin \left (\frac {f x}{2}+\frac {e}{2}\right )+\sin \left (\frac {5 f x}{2}+\frac {5 e}{2}\right )+\cos \left (\frac {5 f x}{2}+\frac {5 e}{2}\right )\right )}\) \(496\)
risch \(\frac {x \,d^{3} A}{a^{3}}+\frac {3 x \,d^{2} B c}{a^{3}}-\frac {3 x \,d^{3} B}{a^{3}}-\frac {B \,d^{3} {\mathrm e}^{i \left (f x +e \right )}}{2 a^{3} f}-\frac {B \,d^{3} {\mathrm e}^{-i \left (f x +e \right )}}{2 a^{3} f}-\frac {2 \left (9 c^{2} d A +21 d^{2} c A +21 c^{2} d B -96 d^{2} c B +72 d^{3} B +2 A \,c^{3}+3 B \,c^{3}-270 i B \,d^{3} {\mathrm e}^{i \left (f x +e \right )}-15 i B \,c^{3} {\mathrm e}^{i \left (f x +e \right )}+115 i A \,d^{3} {\mathrm e}^{i \left (f x +e \right )}-120 B \,c^{2} d \,{\mathrm e}^{2 i \left (f x +e \right )}+555 B c \,d^{2} {\mathrm e}^{2 i \left (f x +e \right )}-120 A c \,d^{2} {\mathrm e}^{2 i \left (f x +e \right )}-45 A \,c^{2} d \,{\mathrm e}^{2 i \left (f x +e \right )}-135 i A \,d^{3} {\mathrm e}^{3 i \left (f x +e \right )}+300 i B \,d^{3} {\mathrm e}^{3 i \left (f x +e \right )}+15 i B \,c^{3} {\mathrm e}^{3 i \left (f x +e \right )}+45 A c \,d^{2} {\mathrm e}^{4 i \left (f x +e \right )}+45 B \,c^{2} d \,{\mathrm e}^{4 i \left (f x +e \right )}-135 B c \,d^{2} {\mathrm e}^{4 i \left (f x +e \right )}-15 B \,c^{3} {\mathrm e}^{2 i \left (f x +e \right )}+345 i B c \,d^{2} {\mathrm e}^{i \left (f x +e \right )}-45 A \,d^{3} {\mathrm e}^{4 i \left (f x +e \right )}+90 B \,d^{3} {\mathrm e}^{4 i \left (f x +e \right )}-420 B \,d^{3} {\mathrm e}^{2 i \left (f x +e \right )}+185 A \,d^{3} {\mathrm e}^{2 i \left (f x +e \right )}-20 A \,c^{3} {\mathrm e}^{2 i \left (f x +e \right )}-60 i B \,c^{2} d \,{\mathrm e}^{i \left (f x +e \right )}-60 i A c \,d^{2} {\mathrm e}^{i \left (f x +e \right )}-45 i A \,c^{2} d \,{\mathrm e}^{i \left (f x +e \right )}+90 i A c \,d^{2} {\mathrm e}^{3 i \left (f x +e \right )}+90 i B \,c^{2} d \,{\mathrm e}^{3 i \left (f x +e \right )}-405 i B c \,d^{2} {\mathrm e}^{3 i \left (f x +e \right )}+45 i A \,c^{2} d \,{\mathrm e}^{3 i \left (f x +e \right )}-10 i A \,c^{3} {\mathrm e}^{i \left (f x +e \right )}-32 A \,d^{3}\right )}{15 f \,a^{3} \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )^{5}}\) \(599\)
norman \(\text {Expression too large to display}\) \(1348\)

[In]

int((A+B*sin(f*x+e))*(c+d*sin(f*x+e))^3/(a+a*sin(f*x+e))^3,x,method=_RETURNVERBOSE)

[Out]

2/f/a^3*(-(A*c^3-A*d^3-3*B*c*d^2+3*B*d^3)/(tan(1/2*f*x+1/2*e)+1)-1/2*(-4*A*c^3+6*A*c^2*d-2*A*d^3+2*B*c^3-6*B*c
*d^2+4*B*d^3)/(tan(1/2*f*x+1/2*e)+1)^2-1/3*(8*A*c^3-18*A*c^2*d+12*A*c*d^2-2*A*d^3-6*B*c^3+12*B*c^2*d-6*B*c*d^2
)/(tan(1/2*f*x+1/2*e)+1)^3-1/4*(-8*A*c^3+24*A*c^2*d-24*A*c*d^2+8*A*d^3+8*B*c^3-24*B*c^2*d+24*B*c*d^2-8*B*d^3)/
(tan(1/2*f*x+1/2*e)+1)^4-1/5*(4*A*c^3-12*A*c^2*d+12*A*c*d^2-4*A*d^3-4*B*c^3+12*B*c^2*d-12*B*c*d^2+4*B*d^3)/(ta
n(1/2*f*x+1/2*e)+1)^5+d^2*(-d*B/(1+tan(1/2*f*x+1/2*e)^2)+(A*d+3*B*c-3*B*d)*arctan(tan(1/2*f*x+1/2*e))))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 649 vs. \(2 (217) = 434\).

Time = 0.27 (sec) , antiderivative size = 649, normalized size of antiderivative = 2.88 \[ \int \frac {(A+B \sin (e+f x)) (c+d \sin (e+f x))^3}{(a+a \sin (e+f x))^3} \, dx=-\frac {15 \, B d^{3} \cos \left (f x + e\right )^{4} - 3 \, {\left (A - B\right )} c^{3} + 9 \, {\left (A - B\right )} c^{2} d - 9 \, {\left (A - B\right )} c d^{2} + 3 \, {\left (A - B\right )} d^{3} + {\left ({\left (2 \, A + 3 \, B\right )} c^{3} + 3 \, {\left (3 \, A + 7 \, B\right )} c^{2} d + 3 \, {\left (7 \, A - 32 \, B\right )} c d^{2} - {\left (32 \, A - 117 \, B\right )} d^{3} - 15 \, {\left (3 \, B c d^{2} + {\left (A - 3 \, B\right )} d^{3}\right )} f x\right )} \cos \left (f x + e\right )^{3} + 60 \, {\left (3 \, B c d^{2} + {\left (A - 3 \, B\right )} d^{3}\right )} f x - {\left (2 \, {\left (2 \, A + 3 \, B\right )} c^{3} + 3 \, {\left (6 \, A - B\right )} c^{2} d - 3 \, {\left (A + 19 \, B\right )} c d^{2} - {\left (19 \, A - 84 \, B\right )} d^{3} + 45 \, {\left (3 \, B c d^{2} + {\left (A - 3 \, B\right )} d^{3}\right )} f x\right )} \cos \left (f x + e\right )^{2} - 3 \, {\left ({\left (3 \, A + 2 \, B\right )} c^{3} + 3 \, {\left (2 \, A + 3 \, B\right )} c^{2} d + 9 \, {\left (A - 6 \, B\right )} c d^{2} - 9 \, {\left (2 \, A - 7 \, B\right )} d^{3} - 10 \, {\left (3 \, B c d^{2} + {\left (A - 3 \, B\right )} d^{3}\right )} f x\right )} \cos \left (f x + e\right ) + {\left (15 \, B d^{3} \cos \left (f x + e\right )^{3} + 3 \, {\left (A - B\right )} c^{3} - 9 \, {\left (A - B\right )} c^{2} d + 9 \, {\left (A - B\right )} c d^{2} - 3 \, {\left (A - B\right )} d^{3} + 60 \, {\left (3 \, B c d^{2} + {\left (A - 3 \, B\right )} d^{3}\right )} f x - {\left ({\left (2 \, A + 3 \, B\right )} c^{3} + 3 \, {\left (3 \, A + 7 \, B\right )} c^{2} d + 3 \, {\left (7 \, A - 32 \, B\right )} c d^{2} - 2 \, {\left (16 \, A - 51 \, B\right )} d^{3} + 15 \, {\left (3 \, B c d^{2} + {\left (A - 3 \, B\right )} d^{3}\right )} f x\right )} \cos \left (f x + e\right )^{2} - 3 \, {\left ({\left (2 \, A + 3 \, B\right )} c^{3} + 3 \, {\left (3 \, A + 2 \, B\right )} c^{2} d + 3 \, {\left (2 \, A - 17 \, B\right )} c d^{2} - {\left (17 \, A - 62 \, B\right )} d^{3} - 10 \, {\left (3 \, B c d^{2} + {\left (A - 3 \, B\right )} d^{3}\right )} f x\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{15 \, {\left (a^{3} f \cos \left (f x + e\right )^{3} + 3 \, a^{3} f \cos \left (f x + e\right )^{2} - 2 \, a^{3} f \cos \left (f x + e\right ) - 4 \, a^{3} f + {\left (a^{3} f \cos \left (f x + e\right )^{2} - 2 \, a^{3} f \cos \left (f x + e\right ) - 4 \, a^{3} f\right )} \sin \left (f x + e\right )\right )}} \]

[In]

integrate((A+B*sin(f*x+e))*(c+d*sin(f*x+e))^3/(a+a*sin(f*x+e))^3,x, algorithm="fricas")

[Out]

-1/15*(15*B*d^3*cos(f*x + e)^4 - 3*(A - B)*c^3 + 9*(A - B)*c^2*d - 9*(A - B)*c*d^2 + 3*(A - B)*d^3 + ((2*A + 3
*B)*c^3 + 3*(3*A + 7*B)*c^2*d + 3*(7*A - 32*B)*c*d^2 - (32*A - 117*B)*d^3 - 15*(3*B*c*d^2 + (A - 3*B)*d^3)*f*x
)*cos(f*x + e)^3 + 60*(3*B*c*d^2 + (A - 3*B)*d^3)*f*x - (2*(2*A + 3*B)*c^3 + 3*(6*A - B)*c^2*d - 3*(A + 19*B)*
c*d^2 - (19*A - 84*B)*d^3 + 45*(3*B*c*d^2 + (A - 3*B)*d^3)*f*x)*cos(f*x + e)^2 - 3*((3*A + 2*B)*c^3 + 3*(2*A +
 3*B)*c^2*d + 9*(A - 6*B)*c*d^2 - 9*(2*A - 7*B)*d^3 - 10*(3*B*c*d^2 + (A - 3*B)*d^3)*f*x)*cos(f*x + e) + (15*B
*d^3*cos(f*x + e)^3 + 3*(A - B)*c^3 - 9*(A - B)*c^2*d + 9*(A - B)*c*d^2 - 3*(A - B)*d^3 + 60*(3*B*c*d^2 + (A -
 3*B)*d^3)*f*x - ((2*A + 3*B)*c^3 + 3*(3*A + 7*B)*c^2*d + 3*(7*A - 32*B)*c*d^2 - 2*(16*A - 51*B)*d^3 + 15*(3*B
*c*d^2 + (A - 3*B)*d^3)*f*x)*cos(f*x + e)^2 - 3*((2*A + 3*B)*c^3 + 3*(3*A + 2*B)*c^2*d + 3*(2*A - 17*B)*c*d^2
- (17*A - 62*B)*d^3 - 10*(3*B*c*d^2 + (A - 3*B)*d^3)*f*x)*cos(f*x + e))*sin(f*x + e))/(a^3*f*cos(f*x + e)^3 +
3*a^3*f*cos(f*x + e)^2 - 2*a^3*f*cos(f*x + e) - 4*a^3*f + (a^3*f*cos(f*x + e)^2 - 2*a^3*f*cos(f*x + e) - 4*a^3
*f)*sin(f*x + e))

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 11456 vs. \(2 (206) = 412\).

Time = 14.03 (sec) , antiderivative size = 11456, normalized size of antiderivative = 50.92 \[ \int \frac {(A+B \sin (e+f x)) (c+d \sin (e+f x))^3}{(a+a \sin (e+f x))^3} \, dx=\text {Too large to display} \]

[In]

integrate((A+B*sin(f*x+e))*(c+d*sin(f*x+e))**3/(a+a*sin(f*x+e))**3,x)

[Out]

Piecewise((-30*A*c**3*tan(e/2 + f*x/2)**6/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165
*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan
(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 60*A*c**3*tan(e/2 + f*x/2)**5/(15*a**3*f*tan(e/2
+ f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4
+ 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) -
110*A*c**3*tan(e/2 + f*x/2)**4/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan
(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/
2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 100*A*c**3*tan(e/2 + f*x/2)**3/(15*a**3*f*tan(e/2 + f*x/2)**
7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3
*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 94*A*c**3*
tan(e/2 + f*x/2)**2/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/
2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*
a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 40*A*c**3*tan(e/2 + f*x/2)/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*t
an(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*
x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 14*A*c**3/(15*a**3*f*tan(
e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)
**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f
) - 90*A*c**2*d*tan(e/2 + f*x/2)**5/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*
f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 +
 f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 90*A*c**2*d*tan(e/2 + f*x/2)**4/(15*a**3*f*tan(e/2 + f*
x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 22
5*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 180*
A*c**2*d*tan(e/2 + f*x/2)**3/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e
/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)
**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 108*A*c**2*d*tan(e/2 + f*x/2)**2/(15*a**3*f*tan(e/2 + f*x/2)**
7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3
*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 90*A*c**2*
d*tan(e/2 + f*x/2)/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2
)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a
**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 18*A*c**2*d/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)*
*6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a*
*3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 120*A*c*d**2*tan(e/2 + f*x/2)**4/(15*a**3
*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 +
 f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15
*a**3*f) - 60*A*c*d**2*tan(e/2 + f*x/2)**3/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 16
5*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*ta
n(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 132*A*c*d**2*tan(e/2 + f*x/2)**2/(15*a**3*f*tan(
e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)
**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f
) - 60*A*c*d**2*tan(e/2 + f*x/2)/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*t
an(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*
x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 12*A*c*d**2/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan
(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/
2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) + 15*A*d**3*f*x*tan(e/2 + f*x
/2)**7/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a
**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/
2 + f*x/2) + 15*a**3*f) + 75*A*d**3*f*x*tan(e/2 + f*x/2)**6/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2
 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**
3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) + 165*A*d**3*f*x*tan(e/2 + f*x/2)
**5/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3
*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 +
 f*x/2) + 15*a**3*f) + 225*A*d**3*f*x*tan(e/2 + f*x/2)**4/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 +
 f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3
+ 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) + 225*A*d**3*f*x*tan(e/2 + f*x/2)**
3/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f
*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f
*x/2) + 15*a**3*f) + 165*A*d**3*f*x*tan(e/2 + f*x/2)**2/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f
*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 +
165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) + 75*A*d**3*f*x*tan(e/2 + f*x/2)/(15*
a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e
/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2)
+ 15*a**3*f) + 15*A*d**3*f*x/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e
/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)
**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) + 30*A*d**3*tan(e/2 + f*x/2)**6/(15*a**3*f*tan(e/2 + f*x/2)**7 +
 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*
tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) + 150*A*d**3*ta
n(e/2 + f*x/2)**5/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)
**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a*
*3*f*tan(e/2 + f*x/2) + 15*a**3*f) + 320*A*d**3*tan(e/2 + f*x/2)**4/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f
*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 +
f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) + 340*A*d**3*tan(e/2 + f*
x/2)**3/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*
a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e
/2 + f*x/2) + 15*a**3*f) + 334*A*d**3*tan(e/2 + f*x/2)**2/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 +
 f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3
+ 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) + 190*A*d**3*tan(e/2 + f*x/2)/(15*a
**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/
2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) +
 15*a**3*f) + 44*A*d**3/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 +
f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 +
 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 30*B*c**3*tan(e/2 + f*x/2)**5/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a
**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e
/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 30*B*c**3*tan(e/2
+ f*x/2)**4/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 +
225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*t
an(e/2 + f*x/2) + 15*a**3*f) - 60*B*c**3*tan(e/2 + f*x/2)**3/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/
2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)*
*3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 36*B*c**3*tan(e/2 + f*x/2)**2/
(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*t
an(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x
/2) + 15*a**3*f) - 30*B*c**3*tan(e/2 + f*x/2)/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 +
 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f
*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 6*B*c**3/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*
a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(
e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 120*B*c**2*d*tan(
e/2 + f*x/2)**4/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**
5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3
*f*tan(e/2 + f*x/2) + 15*a**3*f) - 60*B*c**2*d*tan(e/2 + f*x/2)**3/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*
tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f
*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 132*B*c**2*d*tan(e/2 + f
*x/2)**2/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225
*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(
e/2 + f*x/2) + 15*a**3*f) - 60*B*c**2*d*tan(e/2 + f*x/2)/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 +
f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 +
 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 12*B*c**2*d/(15*a**3*f*tan(e/2 + f
*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 2
25*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) + 45*
B*c*d**2*f*x*tan(e/2 + f*x/2)**7/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*t
an(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*
x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) + 225*B*c*d**2*f*x*tan(e/2 + f*x/2)**6/(15*a**3*f*tan(e/2 +
f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 +
225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) + 49
5*B*c*d**2*f*x*tan(e/2 + f*x/2)**5/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f
*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 +
f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) + 675*B*c*d**2*f*x*tan(e/2 + f*x/2)**4/(15*a**3*f*tan(e/2
+ f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4
+ 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) +
675*B*c*d**2*f*x*tan(e/2 + f*x/2)**3/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3
*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2
+ f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) + 495*B*c*d**2*f*x*tan(e/2 + f*x/2)**2/(15*a**3*f*tan(e/
2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**
4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f)
+ 225*B*c*d**2*f*x*tan(e/2 + f*x/2)/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*
f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 +
 f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) + 45*B*c*d**2*f*x/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**
3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2
 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) + 90*B*c*d**2*tan(e/2
+ f*x/2)**6/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 +
225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*t
an(e/2 + f*x/2) + 15*a**3*f) + 450*B*c*d**2*tan(e/2 + f*x/2)**5/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan
(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/
2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) + 960*B*c*d**2*tan(e/2 + f*x/
2)**4/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a*
*3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2
 + f*x/2) + 15*a**3*f) + 1020*B*c*d**2*tan(e/2 + f*x/2)**3/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2
+ f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3
 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) + 1002*B*c*d**2*tan(e/2 + f*x/2)**
2/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f
*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f
*x/2) + 15*a**3*f) + 570*B*c*d**2*tan(e/2 + f*x/2)/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)
**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a
**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) + 132*B*c*d**2/(15*a**3*f*tan(e/2 + f*x/2)
**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a*
*3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 45*B*d**
3*f*x*tan(e/2 + f*x/2)**7/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2
+ f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2
 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 225*B*d**3*f*x*tan(e/2 + f*x/2)**6/(15*a**3*f*tan(e/2 + f*x/2)**7
 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*
f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 495*B*d**3*
f*x*tan(e/2 + f*x/2)**5/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 +
f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 +
 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 675*B*d**3*f*x*tan(e/2 + f*x/2)**4/(15*a**3*f*tan(e/2 + f*x/2)**7 +
 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*
tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 675*B*d**3*f*
x*tan(e/2 + f*x/2)**3/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*
x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 7
5*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 495*B*d**3*f*x*tan(e/2 + f*x/2)**2/(15*a**3*f*tan(e/2 + f*x/2)**7 + 7
5*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*ta
n(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 225*B*d**3*f*x*
tan(e/2 + f*x/2)/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)*
*5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**
3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 45*B*d**3*f*x/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)*
*6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a*
*3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 90*B*d**3*tan(e/2 + f*x/2)**6/(15*a**3*f*
tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*
x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a*
*3*f) - 450*B*d**3*tan(e/2 + f*x/2)**5/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a*
*3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/
2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 960*B*d**3*tan(e/2 + f*x/2)**4/(15*a**3*f*tan(e/2 +
f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 +
225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 12
00*B*d**3*tan(e/2 + f*x/2)**3/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(
e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2
)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 1134*B*d**3*tan(e/2 + f*x/2)**2/(15*a**3*f*tan(e/2 + f*x/2)**
7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3
*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 630*B*d**3
*tan(e/2 + f*x/2)/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6 + 165*a**3*f*tan(e/2 + f*x/2)
**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3*f*tan(e/2 + f*x/2)**2 + 75*a*
*3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 144*B*d**3/(15*a**3*f*tan(e/2 + f*x/2)**7 + 75*a**3*f*tan(e/2 + f*x/2)**6
 + 165*a**3*f*tan(e/2 + f*x/2)**5 + 225*a**3*f*tan(e/2 + f*x/2)**4 + 225*a**3*f*tan(e/2 + f*x/2)**3 + 165*a**3
*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f), Ne(f, 0)), (x*(A + B*sin(e))*(c + d*sin(e))*
*3/(a*sin(e) + a)**3, True))

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1682 vs. \(2 (217) = 434\).

Time = 0.34 (sec) , antiderivative size = 1682, normalized size of antiderivative = 7.48 \[ \int \frac {(A+B \sin (e+f x)) (c+d \sin (e+f x))^3}{(a+a \sin (e+f x))^3} \, dx=\text {Too large to display} \]

[In]

integrate((A+B*sin(f*x+e))*(c+d*sin(f*x+e))^3/(a+a*sin(f*x+e))^3,x, algorithm="maxima")

[Out]

-2/15*(3*B*d^3*((105*sin(f*x + e)/(cos(f*x + e) + 1) + 189*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 200*sin(f*x +
 e)^3/(cos(f*x + e) + 1)^3 + 160*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + 75*sin(f*x + e)^5/(cos(f*x + e) + 1)^5
+ 15*sin(f*x + e)^6/(cos(f*x + e) + 1)^6 + 24)/(a^3 + 5*a^3*sin(f*x + e)/(cos(f*x + e) + 1) + 11*a^3*sin(f*x +
 e)^2/(cos(f*x + e) + 1)^2 + 15*a^3*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 15*a^3*sin(f*x + e)^4/(cos(f*x + e)
+ 1)^4 + 11*a^3*sin(f*x + e)^5/(cos(f*x + e) + 1)^5 + 5*a^3*sin(f*x + e)^6/(cos(f*x + e) + 1)^6 + a^3*sin(f*x
+ e)^7/(cos(f*x + e) + 1)^7) + 15*arctan(sin(f*x + e)/(cos(f*x + e) + 1))/a^3) - 3*B*c*d^2*((95*sin(f*x + e)/(
cos(f*x + e) + 1) + 145*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 75*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 15*sin(
f*x + e)^4/(cos(f*x + e) + 1)^4 + 22)/(a^3 + 5*a^3*sin(f*x + e)/(cos(f*x + e) + 1) + 10*a^3*sin(f*x + e)^2/(co
s(f*x + e) + 1)^2 + 10*a^3*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 5*a^3*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + a
^3*sin(f*x + e)^5/(cos(f*x + e) + 1)^5) + 15*arctan(sin(f*x + e)/(cos(f*x + e) + 1))/a^3) - A*d^3*((95*sin(f*x
 + e)/(cos(f*x + e) + 1) + 145*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 75*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 +
15*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + 22)/(a^3 + 5*a^3*sin(f*x + e)/(cos(f*x + e) + 1) + 10*a^3*sin(f*x + e
)^2/(cos(f*x + e) + 1)^2 + 10*a^3*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 5*a^3*sin(f*x + e)^4/(cos(f*x + e) + 1
)^4 + a^3*sin(f*x + e)^5/(cos(f*x + e) + 1)^5) + 15*arctan(sin(f*x + e)/(cos(f*x + e) + 1))/a^3) + A*c^3*(20*s
in(f*x + e)/(cos(f*x + e) + 1) + 40*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 30*sin(f*x + e)^3/(cos(f*x + e) + 1)
^3 + 15*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + 7)/(a^3 + 5*a^3*sin(f*x + e)/(cos(f*x + e) + 1) + 10*a^3*sin(f*x
 + e)^2/(cos(f*x + e) + 1)^2 + 10*a^3*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 5*a^3*sin(f*x + e)^4/(cos(f*x + e)
 + 1)^4 + a^3*sin(f*x + e)^5/(cos(f*x + e) + 1)^5) + 6*B*c^2*d*(5*sin(f*x + e)/(cos(f*x + e) + 1) + 10*sin(f*x
 + e)^2/(cos(f*x + e) + 1)^2 + 1)/(a^3 + 5*a^3*sin(f*x + e)/(cos(f*x + e) + 1) + 10*a^3*sin(f*x + e)^2/(cos(f*
x + e) + 1)^2 + 10*a^3*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 5*a^3*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + a^3*s
in(f*x + e)^5/(cos(f*x + e) + 1)^5) + 6*A*c*d^2*(5*sin(f*x + e)/(cos(f*x + e) + 1) + 10*sin(f*x + e)^2/(cos(f*
x + e) + 1)^2 + 1)/(a^3 + 5*a^3*sin(f*x + e)/(cos(f*x + e) + 1) + 10*a^3*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 +
 10*a^3*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 5*a^3*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + a^3*sin(f*x + e)^5/(
cos(f*x + e) + 1)^5) + 3*B*c^3*(5*sin(f*x + e)/(cos(f*x + e) + 1) + 5*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 5*
sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 1)/(a^3 + 5*a^3*sin(f*x + e)/(cos(f*x + e) + 1) + 10*a^3*sin(f*x + e)^2/
(cos(f*x + e) + 1)^2 + 10*a^3*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 5*a^3*sin(f*x + e)^4/(cos(f*x + e) + 1)^4
+ a^3*sin(f*x + e)^5/(cos(f*x + e) + 1)^5) + 9*A*c^2*d*(5*sin(f*x + e)/(cos(f*x + e) + 1) + 5*sin(f*x + e)^2/(
cos(f*x + e) + 1)^2 + 5*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 1)/(a^3 + 5*a^3*sin(f*x + e)/(cos(f*x + e) + 1)
+ 10*a^3*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 10*a^3*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 5*a^3*sin(f*x + e)
^4/(cos(f*x + e) + 1)^4 + a^3*sin(f*x + e)^5/(cos(f*x + e) + 1)^5))/f

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 567 vs. \(2 (217) = 434\).

Time = 0.32 (sec) , antiderivative size = 567, normalized size of antiderivative = 2.52 \[ \int \frac {(A+B \sin (e+f x)) (c+d \sin (e+f x))^3}{(a+a \sin (e+f x))^3} \, dx=-\frac {\frac {30 \, B d^{3}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 1\right )} a^{3}} - \frac {15 \, {\left (3 \, B c d^{2} + A d^{3} - 3 \, B d^{3}\right )} {\left (f x + e\right )}}{a^{3}} + \frac {2 \, {\left (15 \, A c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 45 \, B c d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 15 \, A d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + 45 \, B d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + 30 \, A c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 15 \, B c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 45 \, A c^{2} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 225 \, B c d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 75 \, A d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 210 \, B d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 40 \, A c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 15 \, B c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 45 \, A c^{2} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 60 \, B c^{2} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 60 \, A c d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 435 \, B c d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 145 \, A d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 360 \, B d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 20 \, A c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 15 \, B c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 45 \, A c^{2} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 30 \, B c^{2} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 30 \, A c d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 285 \, B c d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 95 \, A d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 240 \, B d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 7 \, A c^{3} + 3 \, B c^{3} + 9 \, A c^{2} d + 6 \, B c^{2} d + 6 \, A c d^{2} - 66 \, B c d^{2} - 22 \, A d^{3} + 57 \, B d^{3}\right )}}{a^{3} {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}^{5}}}{15 \, f} \]

[In]

integrate((A+B*sin(f*x+e))*(c+d*sin(f*x+e))^3/(a+a*sin(f*x+e))^3,x, algorithm="giac")

[Out]

-1/15*(30*B*d^3/((tan(1/2*f*x + 1/2*e)^2 + 1)*a^3) - 15*(3*B*c*d^2 + A*d^3 - 3*B*d^3)*(f*x + e)/a^3 + 2*(15*A*
c^3*tan(1/2*f*x + 1/2*e)^4 - 45*B*c*d^2*tan(1/2*f*x + 1/2*e)^4 - 15*A*d^3*tan(1/2*f*x + 1/2*e)^4 + 45*B*d^3*ta
n(1/2*f*x + 1/2*e)^4 + 30*A*c^3*tan(1/2*f*x + 1/2*e)^3 + 15*B*c^3*tan(1/2*f*x + 1/2*e)^3 + 45*A*c^2*d*tan(1/2*
f*x + 1/2*e)^3 - 225*B*c*d^2*tan(1/2*f*x + 1/2*e)^3 - 75*A*d^3*tan(1/2*f*x + 1/2*e)^3 + 210*B*d^3*tan(1/2*f*x
+ 1/2*e)^3 + 40*A*c^3*tan(1/2*f*x + 1/2*e)^2 + 15*B*c^3*tan(1/2*f*x + 1/2*e)^2 + 45*A*c^2*d*tan(1/2*f*x + 1/2*
e)^2 + 60*B*c^2*d*tan(1/2*f*x + 1/2*e)^2 + 60*A*c*d^2*tan(1/2*f*x + 1/2*e)^2 - 435*B*c*d^2*tan(1/2*f*x + 1/2*e
)^2 - 145*A*d^3*tan(1/2*f*x + 1/2*e)^2 + 360*B*d^3*tan(1/2*f*x + 1/2*e)^2 + 20*A*c^3*tan(1/2*f*x + 1/2*e) + 15
*B*c^3*tan(1/2*f*x + 1/2*e) + 45*A*c^2*d*tan(1/2*f*x + 1/2*e) + 30*B*c^2*d*tan(1/2*f*x + 1/2*e) + 30*A*c*d^2*t
an(1/2*f*x + 1/2*e) - 285*B*c*d^2*tan(1/2*f*x + 1/2*e) - 95*A*d^3*tan(1/2*f*x + 1/2*e) + 240*B*d^3*tan(1/2*f*x
 + 1/2*e) + 7*A*c^3 + 3*B*c^3 + 9*A*c^2*d + 6*B*c^2*d + 6*A*c*d^2 - 66*B*c*d^2 - 22*A*d^3 + 57*B*d^3)/(a^3*(ta
n(1/2*f*x + 1/2*e) + 1)^5))/f

Mupad [B] (verification not implemented)

Time = 16.14 (sec) , antiderivative size = 593, normalized size of antiderivative = 2.64 \[ \int \frac {(A+B \sin (e+f x)) (c+d \sin (e+f x))^3}{(a+a \sin (e+f x))^3} \, dx=\frac {2\,d^2\,\mathrm {atan}\left (\frac {2\,d^2\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (A\,d+3\,B\,c-3\,B\,d\right )}{2\,A\,d^3-6\,B\,d^3+6\,B\,c\,d^2}\right )\,\left (A\,d+3\,B\,c-3\,B\,d\right )}{a^3\,f}-\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5\,\left (4\,A\,c^3-10\,A\,d^3+2\,B\,c^3+30\,B\,d^3+6\,A\,c^2\,d-30\,B\,c\,d^2\right )+\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (\frac {8\,A\,c^3}{3}-\frac {38\,A\,d^3}{3}+2\,B\,c^3+42\,B\,d^3+4\,A\,c\,d^2+6\,A\,c^2\,d-38\,B\,c\,d^2+4\,B\,c^2\,d\right )+\frac {14\,A\,c^3}{15}-\frac {44\,A\,d^3}{15}+\frac {2\,B\,c^3}{5}+\frac {48\,B\,d^3}{5}+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (\frac {22\,A\,c^3}{3}-\frac {64\,A\,d^3}{3}+2\,B\,c^3+64\,B\,d^3+8\,A\,c\,d^2+6\,A\,c^2\,d-64\,B\,c\,d^2+8\,B\,c^2\,d\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (\frac {20\,A\,c^3}{3}-\frac {68\,A\,d^3}{3}+4\,B\,c^3+80\,B\,d^3+4\,A\,c\,d^2+12\,A\,c^2\,d-68\,B\,c\,d^2+4\,B\,c^2\,d\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (\frac {94\,A\,c^3}{15}-\frac {334\,A\,d^3}{15}+\frac {12\,B\,c^3}{5}+\frac {378\,B\,d^3}{5}+\frac {44\,A\,c\,d^2}{5}+\frac {36\,A\,c^2\,d}{5}-\frac {334\,B\,c\,d^2}{5}+\frac {44\,B\,c^2\,d}{5}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,\left (2\,A\,c^3-2\,A\,d^3+6\,B\,d^3-6\,B\,c\,d^2\right )+\frac {4\,A\,c\,d^2}{5}+\frac {6\,A\,c^2\,d}{5}-\frac {44\,B\,c\,d^2}{5}+\frac {4\,B\,c^2\,d}{5}}{f\,\left (a^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7+5\,a^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+11\,a^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5+15\,a^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+15\,a^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3+11\,a^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+5\,a^3\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )+a^3\right )} \]

[In]

int(((A + B*sin(e + f*x))*(c + d*sin(e + f*x))^3)/(a + a*sin(e + f*x))^3,x)

[Out]

(2*d^2*atan((2*d^2*tan(e/2 + (f*x)/2)*(A*d + 3*B*c - 3*B*d))/(2*A*d^3 - 6*B*d^3 + 6*B*c*d^2))*(A*d + 3*B*c - 3
*B*d))/(a^3*f) - (tan(e/2 + (f*x)/2)^5*(4*A*c^3 - 10*A*d^3 + 2*B*c^3 + 30*B*d^3 + 6*A*c^2*d - 30*B*c*d^2) + ta
n(e/2 + (f*x)/2)*((8*A*c^3)/3 - (38*A*d^3)/3 + 2*B*c^3 + 42*B*d^3 + 4*A*c*d^2 + 6*A*c^2*d - 38*B*c*d^2 + 4*B*c
^2*d) + (14*A*c^3)/15 - (44*A*d^3)/15 + (2*B*c^3)/5 + (48*B*d^3)/5 + tan(e/2 + (f*x)/2)^4*((22*A*c^3)/3 - (64*
A*d^3)/3 + 2*B*c^3 + 64*B*d^3 + 8*A*c*d^2 + 6*A*c^2*d - 64*B*c*d^2 + 8*B*c^2*d) + tan(e/2 + (f*x)/2)^3*((20*A*
c^3)/3 - (68*A*d^3)/3 + 4*B*c^3 + 80*B*d^3 + 4*A*c*d^2 + 12*A*c^2*d - 68*B*c*d^2 + 4*B*c^2*d) + tan(e/2 + (f*x
)/2)^2*((94*A*c^3)/15 - (334*A*d^3)/15 + (12*B*c^3)/5 + (378*B*d^3)/5 + (44*A*c*d^2)/5 + (36*A*c^2*d)/5 - (334
*B*c*d^2)/5 + (44*B*c^2*d)/5) + tan(e/2 + (f*x)/2)^6*(2*A*c^3 - 2*A*d^3 + 6*B*d^3 - 6*B*c*d^2) + (4*A*c*d^2)/5
 + (6*A*c^2*d)/5 - (44*B*c*d^2)/5 + (4*B*c^2*d)/5)/(f*(11*a^3*tan(e/2 + (f*x)/2)^2 + 15*a^3*tan(e/2 + (f*x)/2)
^3 + 15*a^3*tan(e/2 + (f*x)/2)^4 + 11*a^3*tan(e/2 + (f*x)/2)^5 + 5*a^3*tan(e/2 + (f*x)/2)^6 + a^3*tan(e/2 + (f
*x)/2)^7 + a^3 + 5*a^3*tan(e/2 + (f*x)/2)))